package demo11;

class OuterClass{
    public int date1 = 1;
    private int data2 = 2;
    public static int data3 = 3;

    static class InnerClass{
        public int date4 = 4;
        private int data5 = 5;
        public static int data6 = 6;

        public void fun(){
        }
    }
    public void func(){
        InnerClass innerClass = new InnerClass();
        System.out.println(date1);
        System.out.println(data2);
        System.out.println(data3);
        System.out.println(innerClass.date4);
        System.out.println(innerClass.data5);  // 外部类当中 可以访问静态内部类当中的所有成员
        System.out.println(InnerClass.data6);  // 静态的可以直接通过 类名.访问
    }
}
public class Test {
    OuterClass.InnerClass innerClass = new OuterClass.InnerClass();// 实例化静态内部类
}
